<el-dialog title="新增采购申请" v-model="addFormDialog">
  <el-form  ref="addForm" :label-width="dialogLabelWidth" :model="addForm" :rules="addRules">
    <el-row>
    	<el-col :span="9" :offset="1" >
    		<el-form-item label="申请人" prop="app_name">
          <el-select v-model="addForm.app_name" filterable placeholder="请选择申请人">
            <el-option v-for="item in app_names" :label="item.realname" :value="item.id"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="9" :offset="1">
        <el-form-item label="申请类型" prop="type">
          <el-select v-model="addForm.type" placeholder="请选择申请类型">
            <el-option v-for="(value,key) in stationeryType" :label="value" :value="key"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
    </el-row>
    
    <el-row>
    	<el-col :span="9" :offset="1" >
        <el-form-item label="理由" prop="reason">
          <el-input v-model="addForm.reason"placeholder="请填写申请理由" ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="9" :offset="1">
        <el-form-item label="名称" prop="name">
          <el-select v-model="addForm.name" filterable placeholder="请选择用品名称" @change="nameChange">
            <el-option v-for="(value,key) in names" :label="value" :value="value"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
    </el-row>
    
    <el-row>
    	<el-col :span="9" :offset="1">  
        <el-form-item label="规格" prop="specification">
          <el-select v-model="addForm.specification" placeholder="请选择物品规格" @change="specChange">
            <el-option v-for="(value,key) in specifications" :label="value" :value="value"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="9" :offset="1">  
        <el-form-item label="单位" prop="unit">
          <el-select v-model="addForm.unit" placeholder="请选择物品单位">
            <el-option v-for="(value,key) in units" :label="value" :value="value"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
    </el-row>
    
    <el-row>
    	<el-col :span="9" :offset="1">
        <el-form-item label="数量" prop="num">
          <el-input-number v-model.number="addForm.num" :min="1" ></el-input-number>
        </el-form-item>
      </el-col>
      <el-col :span="9" :offset="1">  
        <el-form-item label="申请时间" prop="app_time">
          <el-date-picker v-model="addForm.app_time" type="datetime" placeholder="选择申请时间" 
           style="max-width:200px;" :editable="false" @change="appTime">
          </el-date-picker>
        </el-form-item>
      </el-col>
    </el-row>
    
    <el-row>
    	<el-col :span="9" :offset="1">  
        <el-form-item label="期望交付时间" prop="exp_time" >
          <el-date-picker v-model="addForm.exp_time" type="datetime" placeholder="选择期望交付时间" 
           style="max-width:200px;" :editable="false" @change="expTime">
          </el-date-picker>
        </el-form-item>
      </el-col>
      <el-col :span="9" :offset="1">  
        <el-form-item label="核查人员" prop="inspector">
          <el-select v-model="addForm.inspector" placeholder="请填写核查人员">
            <el-option v-for="item in inspector" :label="item.realname" :value="item.id"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
    </el-row>
    
    <el-row>
    	<el-col :span="9" :offset="1">  
        <el-form-item label="审批人员" prop="approver" required>
          <el-select v-model="addForm.approver" placeholder="请填写审批人员">
            <el-option v-for="item in approver" :label="item.realname" :value="item.id"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="9" :offset="1">
      	<el-form-item label="抄送人员" prop="send_copy">
          <el-select v-model="addForm.send_copy" multiple placeholder="请选择抄送人">
            <el-option v-for="item in app_names" :label="item.realname" :value="item.id"></el-option>
          </el-select>
       </el-form-item>
      </el-col>
    </el-row>
    
    <el-row>
    	<el-col :span="19" :offset="1">  
        <el-form-item label="备注" prop="remark">
          <el-input type="textarea" :rows="4" v-model="addForm.remark" placeholder="请填写备注"></el-input>
        </el-form-item>
    	</el-col>
    </el-row>
  </el-form>

  <div slot="footer" class="dialog-footer">
   <include file="Common:_add" />
  </div>

</el-dialog>
